package com.yss.sofa.report.engine.util;

import java.util.Collection;

import org.apache.poi.ss.usermodel.Workbook;

import com.yss.sofa.report.engine.Report;

public class ReportWorldUtil {

	public static Report emptyExcel(Report report) throws Exception {
		Workbook excel = report.getExcel(true);
		Collection<String> tos = report.getToSheetNames();
		for (String to : tos) {
			excel.removeSheetAt(excel.getSheetIndex(to));
		}
		report.updateMiddle(excel);
		return report;
	}
}
